<?php

namespace App\Admin\Actions\Grid\GoodsOrder;

use App\Admin\Renderable\LogisticsTable;
use Dcat\Admin\Grid\RowAction;
use Dcat\Admin\Widgets\Modal;


class Logistics extends RowAction
{
    /**
    /**
     * @return string
     */
    protected $title = '物流信息';

    public function render()
    {
        $table = LogisticsTable::make()->payload([
            'good_order_id' => $this->getKey(),
            '_simple_' => false
        ]);

        return Modal::make()
            ->xl()
            ->title($this->row()->order_sn . $this->title)
            ->body($table)
            ->button('<a href="javascript:void(0)"><i class="fa fa-dollar"> ' . $this->title . '</i></a>');
    }
}
